package com.task.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.KeyAndValue;
import com.task.core.domain.MissionGroupInfo;
import com.task.core.dto.request.MissionGroupRequestDTO;

/**
 * @author 迪迦.
 * @date 2024/8/14 15:09
 */
@Mapper
public interface MissionGroupMapper {

  List<MissionGroupInfo> getMissionGroupByPage(MissionGroupRequestDTO request);

  MissionGroupInfo getMissionGroupByCodeOrName(@Param("code") String code, @Param("userId") String name);

  List<KeyAndValue> getMissionGroupForOption(MissionGroupRequestDTO request);

  void addMissionGroup(MissionGroupRequestDTO request);

  Integer modifyMissionGroup(MissionGroupRequestDTO request);

  Integer deleteMissionGroup(@Param("code") String code, @Param("userId") Long userId);

  Integer getUsedCount(@Param("code") String missionGroupCode);

    MissionGroupInfo getMissionGroupByCode(MissionGroupRequestDTO missionGroupRequestDTO);
}
